package com.stylefeng.guns.modular.system.model;

import com.baomidou.mybatisplus.enums.IdType;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableName;
import java.io.Serializable;

/**
 * <p>
 *
 * </p>
 *
 * @author stylefeng
 * @since 2018-08-31
 */
@TableName("sys_car_ma")
public class CarMa extends Model<CarMa> {

    private static final long serialVersionUID = 1L;
    public static final  String STATUS_ALREADY_USE ="在途" ;
    public static final String STATUS_NOT_USE = "可使用";
    public static final String STATUS_NORMAL_USE = "常用";
    public static final String STATUS_NORMAL_ORDER = "已预约";
    /**
     * 编号
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;
    /**
     * 车牌后
     */
    @TableField("plate_numbr")
    private String plateNumbr;
    /**
     * 状态
     */
    private Integer status;
    /**
     * 时间
     */
    @TableField("or_time")
    private String orTime;


    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getPlateNumbr() {
        return plateNumbr;
    }

    public void setPlateNumbr(String plateNumbr) {
        this.plateNumbr = plateNumbr;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public String getStatusView(){
        String statusView = "";
        if (this.status==0){
            statusView =STATUS_ALREADY_USE;
        }else if (this.status==1){
            statusView=STATUS_NOT_USE;
        }else if (this.status==2){
            statusView=STATUS_NORMAL_USE;
        }else if (this.status==3){
            statusView=STATUS_NORMAL_ORDER;
        }else {
            statusView="状态异常";
        }
        return statusView;
    }

    public String getOrTime() {
        return orTime;
    }

    public void setOrTime(String orTime) {
        this.orTime = orTime;
    }

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

    @Override
    public String toString() {
        return "CarMa{" +
                "id=" + id +
                ", plateNumbr=" + plateNumbr +
                ", status=" + status +
                ", orTime=" + orTime +
                "}";
    }
}
